//
//  ZMPostDetailViewController.m
//  基本框架
//
//  Created by runone02 on 2018/7/11.
//  Copyright © 2018年 liqiyun. All rights reserved.
//

#import "ZMPostDetailViewController.h"
#import "ZMPostDetailView.h"



@interface ZMPostDetailViewController ()
/** */
@property (nonatomic, strong) ZMPostDetailView *postDetailView;
@end

@implementation ZMPostDetailViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    [self setupNavView];
    [self PostDetailView];
}

- (void)setupNavView{
    [super setupNavView];
    [self.navView.leftButton setImage:backArrowIcon forState:UIControlStateNormal];
    [self.navView.rightButton setImage:IMAGE(@"postDetail_share_h~iphone") forState:UIControlStateNormal];
}


- (void)PostDetailView{
    self.postDetailView = [[ZMPostDetailView alloc]initWithFrame:CGRectZero];
    
    [self.view insertSubview:self.postDetailView belowSubview:self.navView];
    
    [self.postDetailView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.right.mas_equalTo(0);
        make.top.mas_equalTo(self.navView.mas_bottom).with.offset(0);
        make.bottom.mas_equalTo(self.view.mas_bottom).with.offset(-KTabBarHeight);
    }];
    [self.postDetailView.superview layoutIfNeeded];
    self.postDetailView.postId = self.postId;
}
@end
